package com.metrics.calculators;

import com.database.daos.IMaxDao;
import com.database.objects.*;

public class MetricConstantineCohesionCalculator extends MetricCalculator {

	private static final long serialVersionUID = 5178035273356994570L;
	
	private IMaxDao maxDao;

	@Override
	public void calculate(Developer developer, String date, Type type, Status status, Contribution contribution) {
		Double value = maxDao.getMaxConstantineCohesionByDeveloperAndDateAndTypeAndStatus(developer, date, type, status);
		contribution.setConstantineCohesion(value);
	}
	
	public void setMaxDao(IMaxDao maxDao) {
		this.maxDao = maxDao;
	}

}
